//
//  TestJSObject.m
//  changAnCommercial
//
//  Created by 高文富 on 16/11/28.
//  Copyright © 2016年 高文富. All rights reserved.
//

#import "JavaScriptInterface.h"

@implementation JavaScriptInterface

//一下方法都是只是打了个log 等会看log 以及参数能对上就说明js调用了此处的iOS 原生方法
-(NSString *)get:(NSString *)key{
    
    NSLog(@"+++++++++++++++++++++++++++%@",_dicValue);
    if ([[_dicValue allKeys] containsObject:key]){
        
            return [_dicValue objectForKey:key];
        
        }else{
            return @"";
        
        }

}

-(void)put:(NSString *)key :(NSString *)velue{

    NSLog(@"+++++++++++++++++++++++++++%@===========%@",key,velue);

    if (self.delegate && [self.delegate respondsToSelector:@selector(putTo::)])
    {
        [self.delegate putTo:key :velue];
        
    }
    
    

}

-(void)upDataService{

    if (self.delegate && [self.delegate respondsToSelector:@selector(updateValue)])
    {
        [self.delegate updateValue];
        
    }
      
}

-(void)exit{

    if (self.delegate && [self.delegate respondsToSelector:@selector(exitClearValue)])
    {
        [self.delegate exitClearValue];
        
    }
}

@end


